#ifndef _ARDEW_H_
#define _ARDEW_H_

#include "arduino_pins.h"

#define  SLEEPSLICEMS 200

void     ardew_setup();

void     confpin(uint8_t pinno, uint8_t isoutput);
void     confpins(uint8_t lowpin, uint8_t highpin, uint8_t isoutput);

void     setactivelow(uint8_t pinno, uint8_t isactivelow);
uint8_t  isactivelow(uint8_t pinno);

void     setpin(uint8_t pinno, uint8_t bitstate);
void     rawpinoff(uint8_t pinno);
void     rawpinon(uint8_t pinno);
void     pinoff(uint8_t pinno);
void     pinon(uint8_t pinno);
uint8_t  pinread(uint8_t pinno);

uint16_t getinputbits(uint8_t lowpin, uint8_t highpin);
void     setoutputbits(uint16_t outputbits, uint8_t lowpin, uint8_t highpin);

void     sleepms(uint16_t ms);

#endif
